package com.runen.wnhz.runen.presenter.model;

import com.runen.wnhz.runen.data.entity.BaseEntity;
import com.runen.wnhz.runen.data.entity.LessonListEntity;
import com.runen.wnhz.runen.data.entity.LessonTypeBean;
import com.runen.wnhz.runen.service.MajorApi;

import java.util.List;
import java.util.Map;

import rx.Observable;

/**
 *
 * Created by Administrator on 2018-05-04.
 */

/* MVP层中M 层 */
public class MajorModel {

    public MajorApi apiService;


    public MajorModel(MajorApi apiService) {
        this.apiService = apiService;
    }

    //获取课程类型数据
    public Observable<BaseEntity<List<LessonTypeBean>>> getLessonType(Map<String, String> map){
        return apiService.getLessonFromType(map);
    }

    //获取不同类型课程列表数据
    public Observable<BaseEntity<LessonListEntity>> getLessonList(Map<String, Integer> map) {
        return apiService.getLessonList(map);
    }
}
